#ifndef AVATARBUTTON_H
#define AVATARBUTTON_H

#include <QWidget>
#include <QPushButton>
#include <QLabel>

class AvatarButton : public QPushButton
{
    Q_OBJECT
public:
    explicit AvatarButton(QWidget *parent = nullptr);

    void changeMode(bool showMask);

protected:
    void enterEvent(QEnterEvent* event) override;

    void leaveEvent(QEvent* event) override;

private:
    QLabel* mask = nullptr; // 蒙版层
    bool showMask = true;  // 是否显示蒙版
};

#endif // AVATARBUTTON_H
